// Author: wsfuyibing <682805@qq.com>
// Date: 2024-12-03

package errs

import "gitee.com/go-libs/runtime"

var (
	ErrDatabaseQuery = runtime.NewError(500, "数据错误-1")
)

var (
	ErrArcadeNotFound          = runtime.NewError(404, "钓场不存在")
	ErrArcadeMemberNotFound    = runtime.NewError(404, "会员不存在")
	ErrArcadePondNotFound      = runtime.NewError(404, "鱼塘不存在")
	ErrArcadePondMaxLimited    = runtime.NewError(404, "鱼塘太多了")
	ErrArcadeSeatNotFound      = runtime.NewError(404, "钓位不存在")
	ErrArcadeSeatChosenByOther = runtime.NewError(400, "钓位已被其他用户选择")
	ErrArcadeSeatMaxLimited    = runtime.NewError(404, "钓位太多了")
	ErrArcadeSettingNotFound   = runtime.NewError(404, "钓场设置不存在")
	ErrArcadeSwiperMaxLimited  = runtime.NewError(404, "轮播图太多了")
	ErrArcadeSwiperNotFound    = runtime.NewError(404, "轮播图不存在")
)

var (
	ErrCouponNotFound          = runtime.NewError(404, "优惠券不存在")
	ErrCouponNotMatchOnGoods   = runtime.NewError(400, "此券不可用于购买商品")
	ErrCouponNotMatchOnSession = runtime.NewError(400, "此券不可用于购买渔票")
)

var (
	ErrOrderNotFound                      = runtime.NewError(404, "订单不存在")
	ErrOrderCanNotCancel                  = runtime.NewError(400, "订单不可撤销")
	ErrOrderInvalidItemKind               = runtime.NewError(400, "无效的订单条目类型")
	ErrOrderInvalidPayKind                = runtime.NewError(400, "无效的支付类型")
	ErrOrderStateClosedAlready            = runtime.NewError(400, "订单已关闭")
	ErrOrderStateNotNotPaid               = runtime.NewError(400, "订单状态非未支付")
	ErrOrderStateNotAllowClose            = runtime.NewError(400, "订单不可关闭")
	ErrOrderPayKindGenerated              = runtime.NewError(400, "重复操作支付类型")
	ErrOrderPayKindGreaterThanTotalAmount = runtime.NewError(400, "待支付总额与支付类型不匹配")
)

var (
	ErrGoodsCategoryNotFound           = runtime.NewError(404, "分类不存在")
	ErrGoodsPurchaseNotFound           = runtime.NewError(404, "采购不存在")
	ErrGoodsPurchaseOutOfCountToLock   = runtime.NewError(400, "超过最大库存")
	ErrGoodsPurchaseOutOfCountToRemove = runtime.NewError(400, "库存不为空")
	ErrGoodsNotFound                   = runtime.NewError(404, "商品不存在")
	ErrGoodsStockLockFailed            = runtime.NewError(400, "锁定库存失败")
	ErrGoodsStockUnlockFailed          = runtime.NewError(400, "释放库存失败")
	ErrGoodsStockNotEnough             = runtime.NewError(404, "商品库存不足")
)

var (
	ErrTicketNotFound                  = runtime.NewError(404, "渔票不存在")
	ErrTicketRecordNotFound            = runtime.NewError(404, "渔票购票记录不存在")
	ErrTicketRecordNotPaid             = runtime.NewError(404, "订单未支付")
	ErrTicketRecordReturnAlready       = runtime.NewError(400, "已经回鱼")
	ErrTicketRecordReturnAmountInvalid = runtime.NewError(400, "回鱼金额错误")
	ErrTicketRecordReturnCountInvalid  = runtime.NewError(400, "回鱼条数错误")
	ErrTicketRecordReturnWeightInvalid = runtime.NewError(400, "回鱼重量错误")
	ErrTicketSessionNotFound           = runtime.NewError(404, "渔票场次不存在")
	ErrTicketSessionLockFailed         = runtime.NewError(400, "锁定库存失败")
	ErrTicketSessionUnlockFailed       = runtime.NewError(400, "释放库存失败")
	ErrTicketSessionQuantityNotEnough  = runtime.NewError(400, "场次座位不足")
)

var (
	ErrBasanNotFound = runtime.NewError(404, "钓点不存在")
)

var (
	ErrUserBalanceNotEnough      = runtime.NewError(400, "余额不足")
	ErrUserBalanceRecordDenied   = runtime.NewError(400, "余额记录无操作权限")
	ErrUserBalanceRecordNotFound = runtime.NewError(400, "余额记录不存在")
	ErrUserMobileBounded         = runtime.NewError(400, "手机号重复绑定")
	ErrUserMobileNotBind         = runtime.NewError(400, "手机号未绑定")
	ErrUserMobileNotVerify       = runtime.NewError(400, "手机号校验失败")
	ErrUserNicknameExists        = runtime.NewError(400, "昵称已存在")
	ErrUserNotFound              = runtime.NewError(404, "用户不存在")
	ErrUserStatisticNotFound     = runtime.NewError(404, "用户统计不存在")
	ErrUserNotOauth              = runtime.NewError(404, "用户授权不存在")
	ErrUserOauthBounded          = runtime.NewError(400, "授权重复绑定")
	ErrUserOauthNotFound         = runtime.NewError(404, "授权不存在")
	ErrUserRestricted            = runtime.NewError(400, "账号受限")
	ErrUserUnauthorized          = runtime.NewError(401, "未登录")
)

var (
	ErrMasterArcadeAccessDenied   = runtime.NewError(400, "禁止操作钓场")
	ErrMasterArcadeIdNotSpecified = runtime.NewError(400, "未指定钓场")
	ErrMasterArcadeIdNotValid     = runtime.NewError(400, "无效的钓场参数")
)

var (
	ErrQrcodeNotFound     = runtime.NewError(404, "二维码不存在")
	ErrQrcodeTimeout      = runtime.NewError(404, "二维码过期")
	ErrQrcodeScannedLimit = runtime.NewError(404, "二维码已经被使用过了")
	ErrQrcodeNotFormatted = runtime.NewError(400, "二维码内容格式错误")
)

var (
	ErrWithdrawalGreaterThanAvailableBalance = runtime.NewError(400, "超出可用余额")
	ErrWithdrawalGreaterThanMax              = runtime.NewError(400, "超出最大金额")
	ErrWithdrawalLessThanMin                 = runtime.NewError(400, "不足最低金额")
	ErrWithdrawalNoWeixinOauth               = runtime.NewError(400, "必须使用微信")
)
